﻿<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" name="viewport" />
    <meta name="format-detection" content="telephone=no" />
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>@ViewBag.Title</title>
    <link href="~/Content/bootstrap.min.css" rel="stylesheet" />
    <link href="~/Areas/Mobile/Templates/Default/Content/custom.css" rel="stylesheet" />
    <script src="~/Scripts/jquery-1.7.1.min.js"></script>
    <script src="~/Scripts/CommonJS.js"></script>
    <script src="~/Areas/Mobile/Templates/Default/Scripts/custom.js"></script>
</head>
<body>
    <script>
        var areaName = '@ViewBag.AreaName';
        var MAppType = '@ViewBag.MAppType';
    </script>
    @RenderBody()
    @if (ViewBag.LeftNavi == null || (bool)ViewBag.LeftNavi)
    {
        <div class="wx_aside">
            <a href="javascript:;" class="btn_more">更多</a>
            <a href="javascript:;" class="btn_top">返回顶部</a>

                @if (string.IsNullOrWhiteSpace(ViewBag.MAppType))
                {
                    <div class="wx_aside_item">
                        <a href="/@ViewBag.AreaName" class="home">首页</a>
                        <a href="/@ViewBag.AreaName/Vshop" class="vshop">微店</a>
                        <a href="/@ViewBag.AreaName/Category" class="classify">分类</a>
                        <a href="/@ViewBag.AreaName/Cart/Cart" class="f-cart">购物车</a>
                        <a href="/@ViewBag.AreaName/Member/Center" class="user">个人中心</a>
                    </div>
                }
                else
                {
                    <div class="wx_aside_item" style="top:-140px;">
                        <a href="/@ViewBag.AreaName/Vshop/detail/@ViewBag.MVshopId" class="home">店铺首页</a>
                        <a href="/@ViewBag.AreaName/Cart/Cart" class="f-cart">购物车</a>
                        <a href="/@ViewBag.AreaName/Member/Center" class="user">个人中心</a>
                    </div>
                }

        </div>
    }

    @{
           if (ViewBag.CopyRight == null || ((bool)ViewBag.CopyRight))
           {
               <div class="bottom" onclick="javascript:window.location.href='/@ViewBag.AreaName'" style="background-image:url(@ViewBag.Logo)">Copyright &copy; @(ViewBag.SiteName)版权所有</div>
           }
       }

    <script src="~/Scripts/jquery.slides.min.js"></script>
	<script src="~/Scripts/jquery.nicescroll.min.js"></script>
    <script type="text/javascript">
        var sUserAgent = navigator.userAgent.toLowerCase();
        var bIsIpad = sUserAgent.match(/ipad/i) == "ipad";
        var bIsIphoneOs = sUserAgent.match(/iphone os/i) == "iphone os";
        var bIsMidp = sUserAgent.match(/midp/i) == "midp";
        var bIsUc7 = sUserAgent.match(/rv:1.2.3.4/i) == "rv:1.2.3.4";
        var bIsUc = sUserAgent.match(/ucweb/i) == "ucweb";
        var bIsAndroid = sUserAgent.match(/android/i) == "android";
        var bIsCE = sUserAgent.match(/windows ce/i) == "windows ce";
        var bIsWM = sUserAgent.match(/windows mobile/i) == "windows mobile";

        $(function () {
            IsWeiXin();
            //焦点图滚动
			if (!(bIsIpad || bIsIphoneOs || bIsMidp || bIsUc7 || bIsUc || bIsAndroid || bIsCE || bIsWM)) {
				$('body').css('overflow','hidden');
				$("html").niceScroll({cursorwidth: 0,cursorborder:0});
			}
			if($('#slides').children().length==0){
				$('#slides').hide();
			}
			if($('#slides').children().length>1){
				$('#slides').slidesjs({
					width: 640,
					height: 300,
					navigation: false,
					play: {
						active: false,
						auto: true,
						interval: 4000,
						swap: true
					}
				});
			}else{
				$('#slides').css({'height':$(document).width()*15/32})
			}

        });

        function checkLogin(returnHref, callBack, loginshopid) {
            var memberId = $.cookie('Himall-User');
            if (memberId) {
                callBack();
            }
            else {
                $.dialog.tips("您尚未登录，请先登陆", function () {
                    if (loginshopid && MAppType != '')
                        location.href = "/" + areaName + "/Redirect?redirectUrl=" + returnHref + '&shop=' + MAppType;
                    else
                        location.href = "/" + areaName + "/Redirect?redirectUrl=" + returnHref;
                });
            }
        }
        function IsWeiXin() {
            var ua = window.navigator.userAgent.toLowerCase();
            if ((bIsIpad || bIsIphoneOs || bIsMidp || bIsUc7 || bIsUc || bIsAndroid || bIsCE || bIsWM)) {
                if (ua.match(/MicroMessenger/i) == 'micromessenger' && location.href.toLowerCase().indexOf('/m-weixin') == -1&&location.href.toLowerCase().indexOf('/m-wap') >= 0)
                {
                    location.href = location.href.toLowerCase().replace('/m-wap', '/m-weixin');
                }
                else if(ua.match(/MicroMessenger/i) != 'micromessenger'&&location.href.toLowerCase().indexOf('/m-wap') == -1&&location.href.toLowerCase().indexOf('/m-weixin')>=0)
                {
                    location.href = location.href.toLowerCase().replace('/m-weixin', '/m-wap');
                }
            }
        }
    </script>
    <link href="~/Areas/Mobile/Templates/Default/Content/artdialog.css" rel="stylesheet" />
    <script src="~/Scripts/jquery.artDialog.js"></script>
    <script src="~/Scripts/artDialog.iframeTools.js"></script>
    <script src="~/Scripts/jquery.cookie.js"></script>
    <script src="~/Scripts/jquery.scrollLoading.min.js"></script>
</body>
</html>
